package com.pqc.tbk.dao;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface BaseDao<T> {

	public void save(final T entity);

	public void update(final T entity);

	public void delete(final T entity);

	public void delete(final Long id, final Class<T> clazz);

	public T findOne(final Long id, final Class<T> clazz);

	public Long count(final Class<T> clazz);

	/**
	 * @author zlong
	 * @param condition
	 * @param pageable
	 * @return
	 */
	public Page<T> getSearchPage(String condition, Pageable pageable,
			Class<T> clazz);

}